package com.shop.zkmall.app.controller.a;

import com.shop.zkmall.app.domain.req.EditCereBuyerMerchant;
import com.shop.zkmall.app.im.TxTemplate;
import com.shop.zkmall.app.utils.LoginHelper;
import com.shop.zkmall.app.utils.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("im")
@RequiredArgsConstructor
@Tag(name = "IM模块", description = "IM模块")
public class IMController {

    private final TxTemplate txImTemplate;

    @RequestMapping(value = "getSign", method = RequestMethod.POST)
    @Operation(summary = "获取腾讯云签名")
    public R<?> getSign() {
        String userSign = txImTemplate.getUserSign(LoginHelper.getUserId().toString());
        return R.ok(userSign);
    }
}
